package com.ddwl.gate.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author hemiaojun
 * @Date 2020/9/24 16:20
 */
@FeignClient(url = "${bohuan.url}",name="bohuan")
public interface BoHuanClient {

    /**
     *查询余额
     * @param map
     * @return
     */
    @PostMapping(value = "${bohuan.uri.queryBalance}",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    String queryBalance(@RequestParam Map<String, String> map);

    /**
     *充值
     * @param map
     * @return
     */
    @PostMapping(value = "${bohuan.uri.recharge}",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    String recharge(@RequestParam Map<String, String> map);

    /**
     *查询订单
     * @param map
     * @return
     */
    @PostMapping(value = "${bohuan.uri.queryOrder}",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    String queryOrder(@RequestParam Map<String, String> map);
}
